projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2979aea
)
gl renderer: Fix color matrix shader
author
Timm Bäder
<mail@baedert.org>
Sat, 18 May 2019 07:33:38 +0000
(09:33 +0200)
committer
Timm Bäder
<mail@baedert.org>
Sat, 18 May 2019 11:47:59 +0000
(13:47 +0200)
We *just* computed a un-premultiplied color, maybe we should also use
it.
gsk/resources/glsl/color_matrix.fs.glsl
patch
|
blob
|
history
diff --git
a/gsk/resources/glsl/color_matrix.fs.glsl
b/gsk/resources/glsl/color_matrix.fs.glsl
index 07875fe0b48d980acbb8eb7398f66876f956f73a..284e0a9e654a5db5a85c07c681a3cbcced627da6 100644
(file)
--- a/
gsk/resources/glsl/color_matrix.fs.glsl
+++ b/
gsk/resources/glsl/color_matrix.fs.glsl
@@
-11,7
+11,7
@@
void main() {
if (color.a != 0.0)
color.rgb /= color.a;
- color = u_color_matrix *
diffuse
+ u_color_offset;
+ color = u_color_matrix *
color
+ u_color_offset;
color = clamp(color, 0.0f, 1.0f);
color.rgb *= color.a;